bitkeeper revision 1.1159.187.20 (41a77433rez_BGuifdBbTI3Y34kiag)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 26 Nov 2004 18:21:39 +0000 (18:21 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 26 Nov 2004 18:21:39 +0000 (18:21 +0000)
Deal with exception from guest context with real interrupts disabled.
This can happen because IOPL != 0 and even a well-behaved guest may
execute random BIOS code if it is a privileged hardware-controlling
domain (e.g., DOM0 X server).

xen/arch/x86/x86_32/entry.S

index b235f710f97e9b256a6f748c0608efd6fb00c311..32915e4a05d029a85c5df652b44f3b547282b4a8 100644 (file)
@@ -339,7 +339,7 @@ error_code:
         SET_XEN_SEGMENTS(a)
         testb $X86_EFLAGS_IF>>8,XREGS_eflags+1(%esp)
         jz    exception_with_ints_disabled
-        sti                             # re-enable interrupts
+1:      sti                             # re-enable interrupts
         xorl  %eax,%eax
         movw  XREGS_entry_vector(%esp),%ax
         movl  %esp,%edx
@@ -354,8 +354,8 @@ error_code:
 
 exception_with_ints_disabled:
         movb  XREGS_cs(%esp),%al
-       testb $3,%al                    # interrupts disabled outside Xen?
-       jnz   FATAL_exception_with_ints_disabled
+       testb $3,%al   # interrupts disabled outside Xen?
+       jnz   1b       # it really does happen! (e.g., DOM0 X server)
         pushl XREGS_eip(%esp)
         call  search_pre_exception_table
         addl  $4,%esp